projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
936aebf
)
Correctly terminate created string. From Mark Bradley.
author
robertl
<robertl>
Tue, 14 Oct 2003 13:20:00 +0000
(13:20 +0000)
committer
robertl
<robertl>
Tue, 14 Oct 2003 13:20:00 +0000
(13:20 +0000)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index 5219a6606b922be616e643ea5c02d09d82c88623..de96b5959394c70aa75ae0e41b74aa24bbc8a6a9 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-171,7
+171,7
@@
xstrndupt(const char *str, size_t sz)
newstr = xmalloc(newlen + 1);
memcpy(newstr, str, newlen);
- newstr[newlen
+1
] = '\0';
+ newstr[newlen] = '\0';
rtrim(newstr);
return newstr;